package com.zf.yichat.service;

import com.zf.yichat.model.SysDictData;
import com.zf.yichat.model.UserIntegralDetail;
import com.zf.yichat.utils.response.FsPage;
import com.zf.yichat.utils.response.FsResponse;
import com.zf.yichat.vo.IntegralType;

import java.math.BigDecimal;

/**
 * 一句话描述功能
 *
 * @author fengsong
 * @date create in 14:05 2020/3/25 2020
 */
public interface UserIntegralService {

    FsResponse getIntegral(IntegralType type, Long userId, String referId);

    void updateDetail(IntegralType type, String referId, Integer score, Long userId);

    UserIntegralDetail selectLastByType(IntegralType type, Long userId);

    int countDayByType(IntegralType type, Long userId);

    FsResponse detailInfo(FsPage init, Long userId);

    FsResponse info(Long userId);

    SysDictData selectLevel(Integer integral);

    Integer countShare(Long userId);


    /**
     * 根据类型赠送积分
     * @param userId
     * @param type
     */
    void giveIntegralForType(Long userId, String type);

    /**
     * 查询浇水游戏获得的能量块
     * @param init
     * @param userId
     * @return
     */
    FsResponse userEnergyBlockDetails(FsPage init, Long userId);

    /**
     * 初始化积分兑换余额
     * @param userId
     * @return
     */
    FsResponse exchangeBalanceInitialization(Long userId);

    /**
     * 用户积分兑换余额
     * @param userId
     * @param exchangeAmount
     * @return
     */
    FsResponse exchangeBalance(Long userId, BigDecimal exchangeAmount);

    /**
     * 查询用户兑换余额记录
     * @param pageNo
     * @param pageSize
     * @param userId
     * @return
     */
    FsResponse exchangeBalanceRecordList(Integer pageNo, Integer pageSize, Long userId);

    /**
     * 查询用户兑换详情
     * @param userId
     * @return
     */
    FsResponse queryExchangeBalanceDetails(Long userId);

    /**
     * 查询低碳明细
     * @param userId
     * @param type
     * @return
     */
    FsResponse queryLowCarbonDetails(FsPage page, Long userId, Integer type, String ctime);

    /**
     *
     * @param userId
     * @return
     */
    FsResponse queryAccumulated(Long userId);
}
